Files in this folder recreate Figures and Tables in Betz, Cook, Hollenbach: “Spatial Interdependence and Instrumental Variable Models”


The replication files were checked on the Code Ocean Cluster default machine (16-cores with 120 GB of memory - AWS r5d.4xlarge). The computing environment was R.3.6.0 on Ubuntu 18.04.

The approximate run-time for each file is listed in parentheses behind each file Exact run time is listed at the end of each files’ the log. The exact sessionInfo for the replication run is saved in log_sessionInfo.txt in the results folder.

Introduction:
To recreate all plots, tables, and numbers mentioned in the manuscript and appendix, please run Run_all.R
This file will run the following scripts:

1. Examples.R (run time ~ 0.014 sec)
- which recreates the applied example mentioned in the text

2.
sim_sar_minmax.R (run time on 16 cores: ~ 7365.13 sec)
sim_sar_row.R (run time on 16 cores: ~ 7342.1 sec)
sim_slx_minmax.R (run time on 16 cores: ~ 118.312 sec)
sim_slx_row.R (run time on 16 cores: ~ 116.028 sec)

- which creates the simulation results.
- These four r-scripts create the data sets and estimate OLS and either SAR or SLX models on the simulated data. Each file saves the simulation output.
- each file creates a log file: log_SAR_minmax.txt, log_SAR_row.txt, log_SLX_minmax.txt, log_SLX_row.txt

Sar_plots.R (run time ~ 12.081 sec)
- which reads in all results from the SAR DGP simulations and creates 2 figures and 1 table for the manuscript (Figure 1) and online Appendix (Figure C.1 & Table C.1)
- creates log file: log_SAR_plot.txt in results folder

SLX_plots.R (run time ~ 11.7 sec)
- which reads in all results from the SLX DGP simulations and creates 2 figures and 1 table for the online Appendix  (Figures C.2 and C.3 & Table C.2)
- creates log file: log_SLX_plot.txt in results folder
